package eraserhead.xml.response;

import org.w3c.dom.Node;

import xml.Message;
import client.IMessageHandler;
import eraserhead.xml.XmlNode;

/**
 * Response handler for AdminResponse
 * @author Michael Checca
 */
public class AdminResponse implements IMessageHandler {

	@Override
	public void process(Message response) {
		Node admin = XmlNode.findNode(response.contents, "adminResponse");
		if (admin != null) {
			String key = XmlNode.getAttribute(admin, "key");
			System.out.println(String.format("AdminResponse received [key: %s]",
					key));
		}
	}
}
